package cn.tedu.project.oa.asset.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

@Data
public class AssetSaveParam {
    @ApiModelProperty(value = "资产编号")
    private Long id;
    @ApiModelProperty(value = "资产识别码",required = true)
    private String code;
    @ApiModelProperty(value = "资产类型",required = true)
    private String type;
    @ApiModelProperty(value = "品牌",required = true)
    private String brand;
    @ApiModelProperty(value = "规格")
    private String specifications;
    @ApiModelProperty(value = "库存数",required = true)
    private Long stockNum;
    @ApiModelProperty(value = "最新盘点数")
    private Long checkNum;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "购买时间")
    private Date buyTime;
    @ApiModelProperty(value = "购买价格")
    private Double price;
    @NotNull(message = "请选择资产状态")
    @ApiModelProperty(value = "资产状态 空闲1 占用2 待修3 修理中4 报废5",required = true)
    private Integer status;
    @ApiModelProperty(value = "目前使用者员工编号",required = true)
    private Long userId;
    @ApiModelProperty(value = "所属地",required = true)
    private String location;
    @ApiModelProperty(value = "所属部门编号",required = true)
    private Long departmentId;
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "最新盘点负责人")
    private Long checkUserId;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "最新盘点日期")
    private Date checkTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
}
